{include file="admin.javascript_common.tpl"}
<script language="javascript">
function openMyWin(link, name)
{ldelim}
  var newWin = open(link, name, 'status=no,toolbar=no,menubar=no,scrollbars=yes,width=800,height=550');
{rdelim}
function order(form, order)
{ldelim}
  document.forms[form].order.value=order;
  document.forms[form].act.value='';
  document.forms[form].submit();
{rdelim}
function status(form,id,value)
{ldelim}
  document.forms[form].act.value='status';
  document.forms[form].{$WorkTableKeyVarName}.value=id;
  document.forms[form].active.value=value;
  document.forms[form].submit();
{rdelim}
function option(act,form,id,value)
{ldelim}
  document.forms[form].act.value=act;
  document.forms[form].{$WorkTableKeyVarName}.value=id;
  document.forms[form].active.value=value;
  document.forms[form].submit();
{rdelim}
function itemCheck(id)
{ldelim}
  document.getElementById(id).checked='true';
{rdelim}
function showAddNewForm()
{ldelim}
  document.getElementById('addnewitem').style.display='block';
  document.getElementById('listing').style.display='none';
{rdelim}
function hideAddNewForm()
{ldelim}
  document.getElementById('addnewitem').style.display='none';
  document.getElementById('listing').style.display='block';
{rdelim}
</script>

<script language="javascript">
function checkItems(checkvalue)
{ldelim}
  var item = document.forms['{$Config.mainFormName}'].elements;
  var re = /item\[[\s\d\w]+\]/;
  var re1 = /[\d]+/;
  for(var name in item)
  {ldelim}
    if(name.match(re))
    {ldelim}
      item[name].checked=checkvalue;
    {rdelim}
    else if(name.match(re1) && item[name].name.match(re))
    {ldelim}
      item[name].checked=checkvalue;
    {rdelim}
  {rdelim}
{rdelim}
</script>